package com.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.user.domain.pojo.UserFollow;
import com.user.mapper.UserFollowMapper;
import com.user.service.IUserFollowService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户关注列表 服务实现类
 * </p>
 *
 * @author 小杰大人
 * @since 2025-03-17
 */
@Service
public class UserFollowServiceImpl extends ServiceImpl<UserFollowMapper, UserFollow> implements IUserFollowService {

    @Override
    public Long getFollowCount(Long userId) {
        return this.count(new LambdaQueryWrapper<UserFollow>()
                .eq(UserFollow::getFollowUserId, userId));
    }
}
